package com.burpee.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.burpee.dao.FoodDao;
import com.burpee.ui.Food;

@Service(value="foodService")
public class FoodServiceImpl implements FoodService {

	@Autowired
	FoodDao foodDao;

	public List<Food> list() {
		
		return foodDao.list();
	}


	public Food view(long foodNo) {
		
		return foodDao.view(foodNo);
	}

	public boolean add(Food food) {
		if(foodDao.add(food) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean modify(Food food) {
		if(foodDao.modify(food) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean remove(Food food) {
		if(foodDao.remove(food) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public List<Food> foodIngestPurposeSelectList(Food food) {
		// TODO Auto-generated method stub
		return foodDao.foodIngestPurposeSelectList(food);
	}

	

}
